<!--
  Generated template for the ApplyTabPage page.

  See http://ionicframework.com/docs/components/#navigation for more info on
  Ionic pages and navigation.
-->
<ion-header>
    <ion-navbar>
        <ion-title>
            报销申请
        </ion-title>
    </ion-navbar>
</ion-header>
<ion-content class="apply-con">
    <!--<div class="hr"></div>-->
    <div class="apply-conter-div">
        <ion-item (click)="bxTypeHander()">
            <ion-label><span class="required">* </span>报销类型
                <span class="input_span">{{bxTypeLabel}}</span>
            </ion-label>
            <img src="assets/imgs/icon-right arrow@2x.png" item-end/>
        </ion-item>

        <div *ngIf="bxTypeId==4" >
            <ion-item (click)="compactList()">
                <ion-label><span class="required">* </span>合同名称
                    <span class="input_span">{{compactName}}</span>
                </ion-label>
                <img src="assets/imgs/icon-right arrow@2x.png" item-end/>
            </ion-item>
            <ion-item  (click)="compactStageListInfo()">
                <ion-label><span class="required">* </span>合同阶段
                    <span class="input_span">{{compactStageLabel}}</span>
                </ion-label>
                <img src="assets/imgs/icon-right arrow@2x.png" item-end/>
            </ion-item>
        </div>
        <ion-item *ngIf="bxTypeId==3" (click)="zxApplyListInfo()">zxApplyLabel
            <ion-label><span class="required">* </span>执行申请单
                <span class="input_span">{{zxApplyLabel}}</span>
            </ion-label>
            <img src="assets/imgs/icon-right arrow@2x.png" item-end/>
        </ion-item>

        <ion-item *ngIf="bxTypeId==2" (click)="getFeeApplyListInfo()">
            <ion-label><span class="required">* </span>资金申请单 <span class="input_span">{{applyDH}}</span></ion-label>
            <img src="assets/imgs/icon-right arrow@2x.png" item-end/>
        </ion-item>
        <div>
            <ion-item (click)="getProject()">
                <ion-label><span class="required">* </span>指标名称
                    <span class="input_span">{{zbName}}</span>
                </ion-label>
                <img src="assets/imgs/icon-right arrow@2x.png" item-end/>
            </ion-item>
            <ion-item>
                <ion-label><span class="required">* </span>可用余额
                    <span class="input_span">{{availableMoney}}</span>
                </ion-label>
            </ion-item>
        </div>
        <div class="h_line"></div>
        <ion-item (click)="bxBranchHander()">
            <ion-label><span class="required">* </span>报销部门
                <span class="input_span">{{bxBranchLabel}}</span>
            </ion-label>
            <img src="assets/imgs/icon-right arrow@2x.png" item-end/>
        </ion-item>

        <ion-item>
            <ion-label><span class="required">* </span>报销人</ion-label>
            <ion-input type="text" placeholder="报销人" [(ngModel)]="submitPerson"></ion-input>
        </ion-item>
        <ion-item>
            <ion-label><span class="required">* </span>报销日期</ion-label>
            <ion-datetime displayFormat="YYYY-MM-DD" cancelText="取消" doneText="确定" style="color: #666666"
                          [(ngModel)]="applyDate">{{applyDate}}
            </ion-datetime>
            <img src="assets/imgs/icon_time.png" item-end class="date-img">
        </ion-item>
        <div class="h_line"></div>
        <div class="textarea-div">
            <ion-label style="margin-left: 0.5rem;"><span class="required">* </span>报销事由</ion-label>
            <textarea class="textarea" [(ngModel)]="bxsyVal" (keydown)="onTextKeyDown('1')" (keyup)="onTextKeyUp('1')"
                      maxlength="500"></textarea>
        </div>
        <ion-item (click)="getPayItems()">
            <ion-label><span class="required">* </span>支出事项
                <span style="margin-left: 38px;">{{expendName}}</span>
            </ion-label>
            <img src="assets/imgs/icon-right arrow@2x.png" item-end/>
        </ion-item>
        <!--<ion-item>
            <ion-label><span class="required">* </span>申请金额</ion-label>
            <ion-input type="number" placeholder="申请金额" [(ngModel)]="applyMoney"></ion-input>
        </ion-item>-->
        <div class="textarea-div">
            <ion-label style="margin-left: 0.5rem;">备注</ion-label>
            <textarea class="textarea" [(ngModel)]="remarkVal" (keydown)="onTextKeyDown('2')" (keyup)="onTextKeyUp('2')"
                      maxlength="2000"></textarea>
        </div>
        <div class="h_line"></div>
        <div class="upload" (click)="presentActionSheet()">
            <p >上传附件</p>
        </div>
        <div style="width: 93%;margin: 0 auto">
            <ion-grid>
                <ion-row>
                    <ion-col col-4 *ngFor="let item of fileList">
                        <!--<p style="color: #666666" ><span>附件名称:</span>&nbsp;&nbsp;{{item.FuJianMC}}</p>-->
                        <img [src]="item.FuJianLJ" style="width: 15rem;height: 11rem">
                    </ion-col>
                </ion-row>
            </ion-grid>
        </div>
    </div>
    <div class="buttonDiv" (click)="next()">
        <button ion-button>下一步</button>
    </div>
</ion-content>

